﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
										xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
										xmlns:Shapes="clr-namespace:FluidKit.Shapes;assembly=FluidKit">
	<Style TargetType="Shape"
				 x:Key="ShapeBaseStyle">
		<Setter Property="Width"
						Value="400"/>
		<Setter Property="Height"
						Value="400"/>
		<Setter Property="Fill"
						Value="LightGray"/>
		<Setter Property="StrokeThickness"
						Value="2"/>
		<Setter Property="Stroke"
						Value="DarkGray"/>
		<Setter Property="Margin"
						Value="10"/>
		<Setter Property ="Opacity"
						Value="0.1"/>
	</Style>

	<Style TargetType="{x:Type Ellipse}"
				 BasedOn="{StaticResource ShapeBaseStyle}"/>
	<Style TargetType="{x:Type Rectangle}"
				 BasedOn="{StaticResource ShapeBaseStyle}"/>



	<Style TargetType="{x:Type Shapes:PolygonShape}"
				 BasedOn="{StaticResource ShapeBaseStyle}"/>
	<Style TargetType="{x:Type Shapes:CogWheelShape}"
				 BasedOn="{StaticResource ShapeBaseStyle}"/>


	<Style TargetType="{x:Type Slider}">
		<Setter Property="Width"
						Value="200"/>
		<Setter Property="Height"
						Value="30"/>
		<Setter Property="IsSnapToTickEnabled"
						Value="True"/>
		<Setter Property="HorizontalAlignment"
						Value="Left"/>
		<Setter Property="TickPlacement"
						Value="BottomRight"/>
	</Style>

	<Style TargetType="{x:Type DockPanel}">
		<Setter Property="HorizontalAlignment"
						Value="Center"/>
		<Setter Property="VerticalAlignment"
						Value="Center"/>
		<Setter Property="Margin"
						Value="10"/>
		<Setter Property="Background"
						Value="#FFFAFAFA"/>
	</Style>

	<DataTemplate x:Key="HeaderTemplate">
		<StackPanel Orientation="Horizontal"
								Opacity="0.3"
								x:Name="headerStack">
			<TextBlock VerticalAlignment="Center"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"
								 FontSize="16"/>
			<Rectangle VerticalAlignment="Center"
								 Margin="10"
								 Style="{x:Null}"
								 Width="50"
								 Height="50">
				<Rectangle.Fill>
					<VisualBrush Visual="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabItem}}, Path=Tag}"
											 Stretch="Uniform"
											 AlignmentX="Center"
											 AlignmentY="Center"/>
				</Rectangle.Fill>
			</Rectangle>

		</StackPanel>
		<DataTemplate.Triggers>
			<DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabItem}}, Path=IsSelected}"
									 Value="True">
				<Setter TargetName="headerStack"
								Property="Opacity"
								Value="1" />
			</DataTrigger>
		</DataTemplate.Triggers>
	</DataTemplate>


	<Style TargetType="{x:Type HeaderedContentControl}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type HeaderedContentControl}">
					<ControlTemplate.Resources>
						<Style TargetType="{x:Type TextBlock}">
							<Setter Property ="Width"
											Value="150"/>
						</Style>
					</ControlTemplate.Resources>
					<Border Margin="5">
						<StackPanel Orientation="Horizontal">
							<TextBlock Text ="{TemplateBinding Header}"/>
							<ContentPresenter/>
							<TextBlock Text ="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Value}"
												 Margin="5,0,0,0"/>
						</StackPanel>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>


</ResourceDictionary>